package com.shetou.yun.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.shetou.yun.R;
import com.shetou.yun.fragment.NewVersionDialogFragment;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class Result_Activity extends AppCompatActivity {

    @BindView(R.id.imageView5)
    ImageView imageView5;
    @BindView(R.id.tv_constitution)
    TextView tvConstitution;
    @BindView(R.id.tvvalue_constitution)
    TextView tvvalueConstitution;
    @BindView(R.id.imageView6)
    ImageView imageView6;
    @BindView(R.id.tvvalue_zhuyi)
    TextView tvvalueZhuyi;
    @BindView(R.id.tv_constitution2)
    TextView tvConstitution2;
    @BindView(R.id.textView9)
    TextView textView9;
    @BindView(R.id.textView17)
    TextView textView17;
    @BindView(R.id.textView10)
    TextView textView10;
    @BindView(R.id.textView18)
    TextView textView18;
    @BindView(R.id.textView11)
    TextView textView11;
    @BindView(R.id.textView19)
    TextView textView19;
    @BindView(R.id.textView12)
    TextView textView12;
    @BindView(R.id.textView20)
    TextView textView20;
    @BindView(R.id.textView13)
    TextView textView13;
    @BindView(R.id.textView21)
    TextView textView21;
    @BindView(R.id.image_environment2)
    ImageView imageEnvironment2;
    @BindView(R.id.tv_environment2)
    TextView tvEnvironment2;
    @BindView(R.id.textView36)
    TextView textView36;
    @BindView(R.id.image_sports)
    ImageView imageSports;
    @BindView(R.id.tv_sports)
    TextView tvSports;

    @BindView(R.id.image_spirit)
    ImageView imageSpirit;
    @BindView(R.id.tv_spirit)
    TextView tvSpirit;
    @BindView(R.id.textView46)
    TextView textView46;
    @BindView(R.id.image_diet)
    ImageView imageDiet;
    @BindView(R.id.tv_diet)
    TextView tvDiet;
    @BindView(R.id.tvvalue_diet)
    TextView tvvalueDiet;
    @BindView(R.id.image_medicine)
    ImageView imageMedicine;
    @BindView(R.id.tv_medicine)
    TextView tvMedicine;
    @BindView(R.id.tvvalue_medicine)
    TextView tvvalueMedicine;
    @BindView(R.id.button2)
    Button button2;
    @BindView(R.id.button3)
    Button button3;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_result_);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.button2, R.id.button3})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.button2:
                NewVersionDialogFragment newVersionDialogFragment = NewVersionDialogFragment.newInstance("11", "22");
                newVersionDialogFragment.show(getSupportFragmentManager(), "111");
                newVersionDialogFragment.setOnUpdateListener(new NewVersionDialogFragment.OnUpdateListener() {
                    @Override
                    public void onUpdate(String name, String sex, String age, String Medical_history, String tele) {
                        Log.e("1111", "xx" + name + sex);
                        Toast.makeText(Result_Activity.this, "姓名：" + name + "," + "性别："
                                + sex + "," + "年龄：" + age + "," + "病史：" + Medical_history + "," + "电话：" + tele, Toast.LENGTH_SHORT).show();
                    }
                });
                break;
            case R.id.button3:

                break;
        }
    }
}
